/*
 * @# UserBaseInfo.java 2011-12-26 下午06:50:20
 * 
 * Copyright (C) 2010 - 2011 广州羿安信息科技有限公司
 * Guangzhou ianswer information technology co. ltd.
 * 
 * All rights reserved!
 */
package com.ianswer.px.user.entity;

import java.util.List;

import com.ianswer.px.user.redis.UserRedis;

/**
 * 用户基础信息, 包括: 标识, 类型, 帐号, 头像, 姓名, 最近登录时间.
 * 
 * @author alvin hwang
 */
public class UserBaseInfo {

	/**
	 * 标识
	 */
	private Long id;

	/**
	 * 用户类型
	 */
	private Long userType;

	/**
	 * 帐号
	 */
	private String email;

	/**
	 * 昵称
	 */
	private String nickname;
	/**
	 * 头像地址
	 */
	private String avatar;

	/**
	 * 职业
	 */
	private String profession;

	/**
	 * 个人域名
	 */
	private String domain;

	/**
	 * 所属省名称
	 */
	private String provinceName;
	/**
	 * 所属市名称
	 */
	private String cityName;

	private Long loginTime;

	/**
	 *相关数值
	 */
	private Figure figure;

	/**
	 * 被关注人所属圈圈
	 */
	private String circleNameStr;

	/**
	 * 关注人包含的圈圈
	 */
	private List<Circle> circles;

	/**
	 * 从redis里读取到userId的基础信息, 若redis里没有, 则读取db.
	 * 
	 * @param userId
	 *            用户标识.
	 * @return 用户基础信息.
	 */
	public static UserBaseInfo get(Long userId) {
		return UserRedis.get(userId);
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserType() {
		return userType;
	}

	public void setUserType(Long userType) {
		this.userType = userType;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getProfession() {
		return profession;
	}

	public void setProfession(String profession) {
		this.profession = profession;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public Long getLoginTime() {
		return loginTime;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public void setLoginTime(Long loginTime) {
		this.loginTime = loginTime;
	}

	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public Figure getFigure() {
		return figure;
	}

	public void setFigure(Figure figure) {
		this.figure = figure;
	}

	public List<Circle> getCircles() {
		return circles;
	}

	public void setCircles(List<Circle> circles) {
		this.circles = circles;
	}

	public String getCircleNameStr() {
		return circleNameStr;
	}

	public void setCircleNameStr(String circleNameStr) {
		this.circleNameStr = circleNameStr;
	}

}
